#!/bin/bash
# date: Mon Aug  1 09:35:54 CST 2022
# author: xxr
read -p "输入一个文件: " filename
if [[ ! -e $filename ]];then
	touch $filename
	echo -e "\e[32m文件已创建\e[0m"
else
	contxt=`cat $filename`
	if [[ -n $contxt ]];then
		echo -e "\e[32m文件存在且不为空\e[0m"
	else
		echo -e "\e[32m文件存在且为空\e[0m"
	fi

fi

